/*---------------------------------------------------
-----------------------------------------------------
Filename:	loadattribs.m
Version:	1.2

Type:		maki/attrib loader
Date:		29. Aug. 2006 - 23:43 
Author:		Martin Poehlmann aka Deimos
E-Mail:		martin@skinconsortium.com
Internet:	www.skinconsortium.com
		www.martin.deimos.de.vu
-----------------------------------------------------
---------------------------------------------------*/

#define MAIN_ATTRIBS_MGR
#define MAIN_ATTRIBS_LOADER

#include <lib/std.mi>

#include attribs/init_windowpage.m
#include attribs/init_playlist.m
#include attribs/init_coversearch.m
#include attribs/init_Autoresize.m
#include attribs/init_Vis.m
#include attribs/init_appearance.m
#include attribs/init_notifier.m
#include attribs/init_browser.m

Global Configattribute FontRenderer, findOpenRect;
Global String FontRenderer_default, findOpenRect_default;

System.onScriptLoaded()
{
	initAttribs_Appearance();
	initAttribs_Autoresize();
	initAttribs_coversearch();
	initAttribs_notifier();
	initAttribs_Browser();
	initAttribs_Vis();

	//without optionsmenu entry:
	initAttribs_windowpage();
	initAttribs_Playlist();

// Set some values off
/*
	FontRenderer = config.getItemByGuid("{280876CF-48C0-40BC-8E86-73CE6BB462E5}").getAttribute("Font Renderer");
	FontRenderer_default = FontRenderer.getData();
	FontRenderer.setData("Win32 TextOut");
*/
	findOpenRect = config.getItemByGuid("{280876CF-48C0-40BC-8E86-73CE6BB462E5}").getAttribute("Find open rect");
	findOpenRect_default = findOpenRect.getData();
	findOpenRect.setData("0");
	if (findOpenRect_default == "Win32 TextOut") findOpenRect_default = "0"; // delete in final release

}

System.onScriptUnloading ()
{
	//FontRenderer.setData(FontRenderer_default);
	findOpenRect.setData(findOpenRect_default);
}
/*
FontRenderer.onDataChanged ()
{
	if (getData() == "Win32 TextOut") return;
	FontRenderer.setData("Win32 TextOut");
}
*/
findOpenRect.onDataChanged ()
{
	if (getData() == "0") return;
	FontRenderer.setData("0");
}
